1. Field of the Invention
The present invention relates to an image processing apparatus, image processing method, image processing program, and storage medium for determining attributes of an image.
2. Description of the Related Art
Conventionally, image forming apparatuses have elaborated various means up to the present date to obtain higher-quality images. One such means is an optimization process based on image types. A document includes various image types such as “text”, “photo”, and the like, and often includes a combination of these image types. For this reason, image reproduction that maintains tonality is required for a photo area, while a process for reclaiming edges that have deteriorated due to Modulation Transfer Function (MTF) characteristics upon scanning is required for a text area.
Area determination accuracy in image area separation is important due to the assumption of such optimization processing. If this accuracy is poor and appropriate area designation is not possible, a suitable process will not be applied, and a good output result will likely not be obtained. The journal of the IEICE '87/2 Vol. J70-B No. 2 presented “Block Separate Transformation Method: BSET Method”, which separates three areas—photo, text, and halftone areas—based on a density change in a block. In this method, a photo area is determined using the characteristic that density change therein is small; text and halftone areas are determined using the characteristic that text areas have a larger period of density change than halftone areas. More specifically, photo areas are determined based on the difference between the minimum and maximum densities in a predetermined block, and text and halftone areas are distinguished based on a count of change over time when digitizing densities in a block using an average signal value.
Japanese Patent No. 03215768 discloses an image area separation method using a runlength after binarization. With this method, an image is binarized to calculate a maximum runlength, and at the same time, when a predetermined condition is met, black pixels are expanded to calculate its maximum runlength. The difference between these runlengths is compared with a threshold, and if the difference is larger, the area is determined to be a halftone area; otherwise, the area is determined to be a text area. As described in this patent, a photo area can be extracted through simultaneous use of the aforementioned BSET method.
With the technique disclosed in the above reference, data (0/1) obtained by binarizing image signal values within a predetermined range are generated, and halftone and text areas are separated by reading the change time count of 0 and 1 in the binary data. More specifically, as in the following inequalities, let KH01 be the change time count of 0 and 1 in the main scan direction of the predetermined range, and KV01 be that in the sub-scan direction. Then, by comparing these change time counts with a threshold TL, a halftone or text area is determined.
KH01≧TL and KV01≧TL . . . halftone area
KH01<TL and KV01<TL . . . text area
However, upon actual image scanning, image signal values include variations due to noise of a light source, errors of CCD sensor sensitivity, and nonuniformity of a document itself to be scanned. By contrast, in the method of calculating the change time counts KH01 and KV01 using binary data, the binary data is vulnerable to measurement errors, and its reliability lowers. As a result, it becomes difficult to discriminate halftone and text areas with sufficient accuracy. Therefore, an image process using the conventional image area separation method, for example, an edge emphasis process of a text area using a filter does not emphasize edges even for a text area, emphasizes edges for a halftone area, and worsens blurring and moiré of characters.
The present invention has been made to solve the problems of the prior arts, and enables more accurate determination of attributes of images.